package com.zzh.thread.test;

import java.io.IOException;

import org.apache.commons.net.ftp.FTP;
import org.apache.commons.net.ftp.FTPClient;
import org.apache.commons.net.ftp.FTPReply;

import com.zzh.ftp.test.FtpHelper;

public class MyThread implements Runnable{

	final static String hostname = "101.201.103.144";
	final static int port = 22;
	final static String username = "root";
	final static String password = "Beijing2017";
	
	public static void main(String[] args) {
		MyThread my = new MyThread();
		
		for(int i=0;i<1;i++){
			Thread thread = new Thread(my);
			thread.start();	
		}
		
	}
	
	@Override
	public void run() { 
		String local = "C:/cv/1-夏小为2.txt";
		String remote = "/58/1-夏小为2.txt"; 
		try {
			FtpHelper fh = new FtpHelper(); 
			if(fh.connect(hostname, port, username, password)){
				fh.upload(local, remote);
				
			}
		} catch (IOException e) { 
			e.printStackTrace();
		}
		  
	
		
	}
	
	 
	

}
